#include "httputils.h"

HttpUtils::HttpUtils(QObject *parent)
    : QObject{parent}
{
    manager = new QNetworkAccessManager(this);

    QObject::connect(manager,&QNetworkAccessManager::finished,this,&HttpUtils::replayFinished);
}

void HttpUtils::replayFinished(QNetworkReply *reply)
{
    emit replySignal(reply->readAll());
}

void HttpUtils::connet(QString url)
{
    QNetworkRequest request;
    request.setUrl(QUrl(Base_Url+url));
    manager->get(request);
}
